//var tmodel = new zxt.data.CVSTableModel("CARDG2");
//tmodel.method("query", "insert", "update", "remove");
		
var tmodel = new zxt.data.CVSTableModel();
tmodel.method("query");

function onInitialize(dw){
	dw.populateComponents();
};			

function configMainGrid(grid){
	grid.getColumn("sex").conf(c4sex);
	grid.getColumn("vip").conf(c4vip);	
};	

function onClick$Query(){	
	
		var cb = {
			onSuccess : function(dw) {
				var name = dw.getSheet("result").attrs().Name;
				$zxtUI.Name.renderValue(name);
			},
			onFailure : function(xmlR, status, e) {
				
			}
		};
	
	tmodel.callback(cb);
	
	var param = {};
	param.ID = $zxtUI.ID.getValue();
	param.Name = $zxtUI.Name.getValue();
	tmodel.setParam(param);
	
};

function onClick$Clear(){
	tmodel.clear();
};	
		
